namespace Pp.Dto.Validators
{
    using System.ComponentModel.DataAnnotations;
    using Globalization;

    public class EmailValidator : RegularExpressionAttribute
    {
        public EmailValidator()
            : base(@"^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$")
        {
            ErrorMessage = Res.Error_PleaseMailFormat;
        }
    }
}